<%@ page language="java" contentType="text/html; charset=UTF-8"
    pageEncoding="UTF-8"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<link rel="stylesheet" href="<%=request.getContextPath() %>/layui/css/layui.css">
	<script type="text/javascript" src="<%=request.getContextPath() %>/layui/layui.js"></script>
	<script>
		layui.use(['upload', 'form'], function(){
		  var layer = layui.layer
		  ,form = layui.form();
		  
		  	layui.upload({
				  url: 'http://192.168.0.106:8080/layerUIDemao/upload'
				  ,type:'file'
				  ,success: function(res){
				    console.log(res); //上传成功返回值，必须为json格式
				  }
			});
		});
		
		 
	</script> 
<meta http-equiv="Content-Type" content="text/html; charset=UTF-8">
<title>Insert title here</title>
</head>
<body>
		<input type="file" name="file" lay-type="file" class="layui-upload-file">

</body>
</html>